package cn.lj.dao;

import cn.lj.domain.Appointment;
import cn.lj.domain.Book;
import cn.lj.domain.Student;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author lj
 * @Description:
 * @date 2020-12-04 14:16
 * @QQ 851477108
 */
@Repository
public interface BookDao {

    List<Book> findAll(@Param("offset") int offset,@Param("limit") int limit);

    Book findById(Long id);

    List<Book> findListByName(String name);

    List<Appointment> findAppointByStu(Long studentId);

    Student checkStudent(@Param("studentId") Long studentId,@Param("password") Long password);

    int reduceNumber(Long bookId);

    int insertAppointment(@Param("bookId") Long bookId, @Param("studentId") Long studentId);
}
